
#ifndef OUTPUT_H
#define OUTPUT_H

#include <stdint.h>

#include "constants.h"
#include "memory.h"
#include "trace.h"
#include "cacheCMP.h"
#include "SingleThreadCMP.h"
#include "tlbCMP.h"
#include "LocalPartitionCMP.h"
#include "ConfigParameter.hpp"

uint32_t
fileSize(std::string fileName);
void outputSimulationDescription(ConfigParameter conf);

std::string
createFileName(char * dirname,Memory * mem,const char * pre, uint32_t policy,
        uint32_t threshold,bool skipwrite);
void outputResults(LocalPartitionCMP *CMP,char * dirname,Memory * mem,
        uint32_t policy,uint32_t threshold, bool skipwrite);
void
outputMigrationResults(char * dirname,Memory * mem,uint32_t policy,
        uint32_t threshold, bool skipwrite);
void
outputWorkingSet(char * dirname,Memory * mem,uint32_t access);
void
outputLPResults(Memory * mem,Trace * trace,uint32_t level,uint32_t *LPHits);
void
outputThresholdLMResults (LocalPartitionCMP *CMP,Memory * mem,Trace * trace,
        ConfigParameter conf);
void
printLMstatus(Memory *mem,Trace *trace,uint32_t policy);

void
outputCMPResults (Memory * mem,Trace * trace, CacheCMP * cacheCMP,
        ConfigParameter & conf);

void
outputTLBResults (const char *dirname,TLBCMP * cmp);
void outputTLBDirectory (Memory * mem,Trace * trace,TLBCMP * CMP);
void outputL0 (Trace * trace,CacheCMP * CMP,uint32_t tid);
void outputSingleThreadCMPResults(Trace * trace,SingleThreadCMP * CMP);


#endif

